Skip to content

docs: replace the typedoc site with VitePress (v2 + v1 reface)#2395

Merged
felixweinberger merged 11 commits into
mainfrom
fweinberger/docs-site
Jun 30, 2026
Merged

docs: replace the typedoc site with VitePress (v2 + v1 reface)#2395
felixweinberger merged 11 commits into
mainfrom
fweinberger/docs-site

Conversation

@felixweinberger

Copy link
Copy Markdown
Contributor

Replace the typedoc HTML site with a VitePress-based documentation site. The hand-written guides lead the navigation, and the generated API reference becomes a single collapsed sidebar section instead of the whole site. The v1 docs at the domain root get the same shell with their content unchanged.

Motivation and Context

The deployed docs are a typedoc dump: a page per symbol dominates the site and the actual guides are buried under a "Documents" entry. This makes the guides the site, keeps the full API reference one click away (rendered as markdown, one page per package), and gives the v1 and v2 docs a consistent look and navigation.

No guide content is rewritten in this PR — existing pages are carried over as-is, with two mechanical transforms: {@linkcode …} tags become plain code spans (VitePress does not resolve typedoc link syntax), and relative links that point outside docs/ become GitHub URLs.

How Has This Been Tested?

  • pnpm docs:build — typedoc (warnings as errors) + VitePress build with dead-link checking: 0 warnings, 0 dead links.
  • bash scripts/build-docs-site.sh — the full two-site deploy artifact (v2 at /v2/, v1 at /, with the v1 leg built from origin/v1.x) builds end to end from a clean tree.
  • git diff over docs/ audited to confirm only the mechanical transforms; pnpm sync:snippets --check, pnpm -r typecheck both green.
  • Both sites previewed locally (navigation, search, API reference sidebar, light/dark, the version banners).

Breaking Changes

None at runtime; this only touches docs tooling and CI for docs.

  • pnpm docs:check now builds the site (typedoc warnings + dead links) instead of running typedoc alone.
  • scripts/generate-multidoc.sh is replaced by scripts/build-docs-site.sh.
  • After this merges, the v1.x branch's copy of deploy-docs.yml should be updated (or its push trigger removed) — as it stands, a push to v1.x would redeploy the old typedoc layout over the site.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

  • The site's landing page is generated from the repository README.md at build time (docs:index), so the README stays the single source of truth — the same model the v1 site uses, and the same landing the previous typedoc site had.
  • The API reference is generated at build time (typedoc-plugin-markdown + typedoc-vitepress-theme, outputFileStrategy: modules — one page per package, not per symbol) into docs/api/, which is gitignored; nothing generated is committed.
  • sync:snippets --check is now part of check:all, so snippet drift fails the PR gate rather than only the local pre-push hook.
  • The deploy workflow gains an explicit pnpm install step (the old script installed inside a throwaway worktree; the new one builds the current checkout).
  • The v1 pages have no top-level heading in the v1.x markdown (the old typedoc shell supplied page titles), so the v1 build step prepends one per page; the v1.x branch itself is untouched.

@felixweinberger felixweinberger requested a review from a team as a code owner June 30, 2026 13:44
@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fde2a5d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2395

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2395

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2395

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2395

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2395

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2395

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2395

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2395

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2395

commit: fde2a5d

Comment thread docs/faq.md
Comment thread scripts/build-docs-index.ts
Comment thread docs/.vitepress/config.mts Outdated
…out-of-tree links

VitePress renders the guide markdown directly, so typedoc-only {@linkcode}
tags now render as plain backticked code. Relative links that point outside
docs/ (examples, codemod sources) become absolute GitHub URLs since they
cannot resolve on the rendered site. The codemod package README gets the
same treatment, which also fixes its links on npm.
typedoc now emits one markdown page per module into docs/api/ (plus a
typedoc-vitepress-theme sidebar JSON) instead of a standalone HTML site.
HTML-theme options (projectDocuments, customJs, navigationLinks,
hostedBaseUrl, headings) are dropped; the root README is excluded since the
site has its own landing page. New scripts: docs:api (typedoc), docs:dev,
docs:build (typedoc + vitepress, the new docs:check gate). check:all now
also runs sync:snippets --check, which skips the generated docs/api tree.
Replaces the typedoc HTML site shell: guide pages get a proper sidebar,
local search, and a home layout landing page reusing the README's own
descriptions. The API Reference is a collapsed sidebar group imported from
the generated typedoc-sidebar.json (with a clear warning when docs:api has
not run yet). The theme extends the VitePress default with a monochrome
palette modeled on the Python SDK docs and a version banner injected via
the layout-top slot. Site-root-relative /specification/ links from
spec-generated JSDoc are rewritten to modelcontextprotocol.io at render
time.
…eline

scripts/build-docs-site.sh replaces generate-multidoc.sh: it builds the v2
VitePress site from the current checkout into /v2/ and the v1 site at the
root from an origin/v1.x worktree. The v1 content (docs/*.md + README.md as
the landing page) is copied into the gitignored docs-v1/content/ at build
time with the same mechanical link transforms applied to the build copy
only — the v1.x branch itself stays untouched. docs-v1/ holds the VitePress
shell for the v1 site, sharing the v2 theme CSS. The deploy workflow and
README now invoke the new script.
Reverts the blanket link-externalization on this README: the four ./src/*.ts
links stay relative (typedoc rewrites them to the matching API pages, and
they work on GitHub/npm). Only the two ../../docs/migration/ links change,
to the docs site URL, which stops typedoc-plugin-markdown copying the
migration docs into api/_media/ with broken relative links of their own.
@felixweinberger felixweinberger force-pushed the fweinberger/docs-site branch from af57115 to fde2a5d Compare June 30, 2026 14:57
@felixweinberger felixweinberger merged commit 732abe0 into main Jun 30, 2026
18 checks passed
@felixweinberger felixweinberger deleted the fweinberger/docs-site branch June 30, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant